/*
 * CServer.cpp
 *
 *  Created on: 05.03.2012
 *      Author: caffeine
 */

#include "CServer.h"
#include <lampe/exception/Null.h>

namespace lampe{
namespace network{



void CServer::threadRunning(){
	waitClient();
}

CServer::CServer(IServerCallBack*cb):CThread(){
	callBack=cb;
	if (!callBack)
		GEN_NULL_ERROR("Server callback can't be NULL");
	callBack->grab();
}

IClientCallback*CServer::getClientObject(){
	return callBack->giveClientCallback();
}

CServer::~CServer(){
	callBack->drop();
}

}//namespace network
}//namespace lampe
